package com.atkxp.stustatusmasystem.service;

import com.atkxp.stustatusmasystem.mapper.ApplicationMapper;
import com.atkxp.stustatusmasystem.pojo.DropApplication;
import com.atkxp.stustatusmasystem.pojo.SwitchApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author user
 * @declaration
 * @create 2023/5/31-20:41
 */
@Service
public class ApplicationServiceImpl implements ApplicationService{

    @Autowired
    public ApplicationMapper applicationMapper;

    @Override
    public int sendSwitchApplication(SwitchApplication switchApplication) {
        return applicationMapper.sendSwitchApplication(switchApplication);
    }

    @Override
    public int receiveSwitchApplication(int id) {
        return applicationMapper.receiveSwitchApplication(id);
    }

    @Override
    public int sendDropApplication(DropApplication dropApplication) {
        return applicationMapper.sendDropApplication(dropApplication);
    }

    @Override
    public int receiveDropApplication(int id) {
        return applicationMapper.receiveDropApplication(id);
    }

    @Override
    public int refuseSwitchApplication(int id) {
        return applicationMapper.refuseSwitchApplication(id);
    }

    @Override
    public int refuseDropApplication(int id) {
        return applicationMapper.refuseDropApplication(id);
    }

    @Override
    public List<SwitchApplication> getAllSwitchApplicationBySid(int sid) {
        return applicationMapper.getAllSwitchApplicationBySid(sid);
    }

    @Override
    public List<DropApplication> getAllDropApplicationBySid(int sid) {
        return applicationMapper.getAllDropApplicationBySid(sid);
    }

    @Override
    public List<SwitchApplication> getAllSwitchApplicationByTid(String tid) {
        return applicationMapper.getAllSwitchApplicationByTid(tid);
    }

    @Override
    public List<DropApplication> getAllDropApplicationByTid(String tid) {
        return applicationMapper.getAllDropApplicationByTid(tid);
    }

    @Override
    public SwitchApplication getSwitchApplicationById(int id) {
        return applicationMapper.getSwitchApplicationById(id);
    }

    @Override
    public DropApplication getDropApplication(int id) {
        return applicationMapper.getDropApplication(id);
    }
}
